import service from "@/utils/request";

// 请假审核
// 分页获取请假列表
export function leaveApplication_getLeaveApplicationByPage(playold: any = {}) {
    return service.get(`/school/leaveApplication/getLeaveApplicationByPage`, { params: playold })
}
// 根据id获取请假
export function leaveApplication_getLeaveApplicationById(id: any) {
    return service.get(`/school/leaveApplication/getLeaveApplicationById/${id}`)
}
// 老师审核状态：id
export function leaveApplication_audit(id: any) {
    return service.post(`/school/leaveApplication/audit/${id}`)
}
// 家长审核状态：id
export function leaveApplication_confirm(id: any) {
    return service.post(`/school/leaveApplication/confirm/${id}`)
}



// 分页获取学校数据
export function school_getSchoolByPage(playold = {}) {
    return service.get('/school/school/getSchoolByPage', { params: playold })
}
// 分页获取所有班级 里边有班级所属学校
export function classes_getClassesByPage(playold: any = {}) {
    return service.get(`/school/classes/getClassesByPage?cp=${playold.cp}&ps=${playold.ps}`)
}

// 出勤统计
export function attendance_attendanceStatistics(playold: any = {}) {
    return service.get(`/school/attendance/attendanceStatistics?time=${playold.time}`)
}




// 健康中心
// 获取所有带药提醒
export function remind_getRemindByPage(playold: any = {}) {
    return service.get(`/school/remind/getRemindByPage?cp=${playold.cp}&ps=${playold.ps}`)
}
// 根据id获取带药提醒（抽屉查看详情）
export function remind_getRemindById(id: any) {
    return service.get(`/school/remind/getRemindById/${id}`)
}
// 根据id删除带药提醒
export function remind_deleteRemind(id: any) {
    return service.delete(`/school/remind/deleteRemind/${id}`)
}



// 消息发布概括
// 根据月份获取 通知数量
export function messageStatistics_noticeNum(playold = {}) {
    return service.get(`/school/messageStatistics/noticeNum`)
}
// 根据月份获取 相册数量
export function messageStatistics_photosNum(playold = {}) {
    return service.get(`/school/messageStatistics/photosNum
    `)
}
// 根据月份获取 评价数量
export function messageStatistics_evaluateNum(playold = {}) {
    return service.get(`/school/messageStatistics/evaluateNum`)
}
// 根据月份获取 投票数量
export function messageStatistics_vote(playold = {}) {
    return service.get(`/school/messageStatistics/vote`)
}
// 学校月消息发布排行
export function messageStatistics_schoolMsgNum(playold = {}) {
    return service.get(`/school/messageStatistics/schoolMsgNum`)
}
// 教师月消息发布排行
export function messageStatistics_teacherMsgNum(playold = {}) {
    return service.get(`/school/messageStatistics/teacherMsgNum`)
}


// 消息统计相关接口（）
export function messageStatistics_msgNum(playold: any = {}) {
    return service.get(`/school/messageStatistics/msgNum?year=${playold.year}&month=${playold.month}`)
}



// 我服了你个老六了
// xss




